package com.kuang.demo01;

public class UserrServiceProxy implements UserService{

    private  UserServiceImpl userService;

    public void setUserService(UserServiceImpl userService) {
        this.userService = userService;
    }

    public void add() {
        log("add");
        userService.add();
    }

    public void del() {
        log("del");
        userService.del();
    }
    //日志方法
    public void log(String msg){
        System.out.println("使用"+msg+"方法");
    }
}
